package android.Dominion.GameBLL;

import android.Dominion.GameBLL.Cards.CardPile;

public class PlayArea
{
	private CardPile deck;
	private CardPile hand;
	private CardPile discard;
	private CardPile revealed;
	
	public PlayArea(){
		deck = new CardPile();
		hand = new CardPile();
		discard = new CardPile();
		revealed = new CardPile();
		
	}
	
	public void ShuffleDiscard(){
		
	}
	
	public CardPile DrawCardsFromDeck(int number){
		CardPile cards = new CardPile(); 
		
		
		if(deck.size() >= number){
			cards.addAll(deck.TakeTopCards(number));
		}else{
			int numTaken = deck.size();
			cards.addAll(deck.TakeTopCards(numTaken));
			int numStillNeeded = number - numTaken;
			ShuffleDiscard();
			cards.addAll(deck.TakeTopCards(numStillNeeded));
		}
		
		return cards;
	}
	
	
	public void setDeck(CardPile deck)
	{
		this.deck = deck;
	}

	public CardPile getDeck()
	{
		return deck;
	}

	public void setHand(CardPile hand)
	{
		this.hand = hand;
	}

	public CardPile getHand()
	{
		return hand;
	}

	public void setDiscard(CardPile discard)
	{
		this.discard = discard;
	}

	public CardPile getDiscard()
	{
		return discard;
	}

	public void setRevealed(CardPile revealed)
	{
		this.revealed = revealed;
	}

	public CardPile getRevealed()
	{
		return revealed;
	}

}
